package spring;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ApplicationContextTest {

    @Test
    public void test(){

        ApplicationContext applicationContext=new ClassPathXmlApplicationContext("services.xml");
        Pig dd = (Pig) applicationContext.getBean("dd");
        PinkPig bean = applicationContext.getBean(PinkPig.class);
        System.out.println(bean.getName());

    }

}